import crypto from "crypto";

export const md5 = (plain: string) => {
  const md5Hash = crypto.createHash("md5");
  md5Hash.update(plain);

  return md5Hash.digest("hex");
};

export const sha1 = (plain: string) => {
  const sha1Hash = crypto.createHash("sha1");
  sha1Hash.update(plain);

  return sha1Hash.digest("hex");
};
